<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="application/javascript" src="/Public/js/jquery.min.js"></script>
    <link rel="stylesheet" href="/Public/uploadify/uploadify.css">
    <script type="text/javascript"    src="/Public/uploadify/jquery.uploadify.min.js"></script>
</head>
<body>
<input id="file" type="file" multiple="true">
<span>类型: *.jpg,*.png 大小: 2000KB 数量: 10</span>
<div class="article_thumb"></div>


<script type="text/javascript">
    $(function() {
        $('#file').uploadify({
            'formData'     : {
                '<?php echo session_name();?>' : '<?php echo session_id();?>',
            },
            'fileTypeDesc' : 'مەھسۇلات رەسىملىرى',//上传描述
            'fileTypeExts' : '*.jpg;*.png',
            'swf'      : '/Public/uploadify/uploadify.swf',
            'uploader' : 'http://www.itblog.com/index.php/admin/Test/index',
            'buttonText':'封面',
            'fileSizeLimit' : '2000KB',
            'uploadLimit' : 10,//上传文件数
            'width':200,
            'height':40,
            'successTimeout':10,//等待服务器响应时间
            'removeTimeout' : 0.2,//成功显示时间
            'onUploadSuccess' : function(file, data, response) {
                data=$.parseJSON(data);
                //获得图片地址
                var li="<li><img src='/"+data+"'/> <input type='hidden' name='cover[]' value='"+data+"'/> </li>";
                $(".article_thumb").prepend(li);

            }
        });
    });
</script>
</body>
</html>